<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
include("db/connect.php");
$selectprovince="SELECT * FROM product ORDER BY pro_name ASC";
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
	function submitPro(){
	$.ajax({
			type:"POST",
			url:"insert_product2.php",
			data:$("#fromInsert_Pro").serialize(),
			success: function(msg){
				$("#spantest").html(msg);
				}
			});//ajax
	}//function submit   

</script>
<style type="text/css">
#fromInsert_Pro p {
	text-align: center;
	font-size: 36px;
}
</style>
</head>
<body>
<form action="Javascript:submitPro();" method="post" enctype="multipart/form-data" name="fromInsert_Pro" id="fromInsert_Pro">
  <p>ข้อมูลสินค้า</p>
  <table width="528" border="0">
    <tr>
      <td width="178">ชื่อสินค้า</td>
      <td width="340">
      <input name="pro_name" type="text" required="required" id="pro_name" maxlength="50"/></td>
    </tr>
    <tr>
      <td>ราคา</td>
      <td>
      <input name="pro_price" type="text" required="required" id="pro_price" />
      บาท</td>
    </tr>
    <tr>
      <td>รายละเอียดสินค้า</td>
      <td><textarea name="pro_detail" cols="30" rows="5" required="required" id="pro_detail"></textarea></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="Submit" id="button" value="ตกลง" />
    <input type="reset" name="button2" id="button2" value="ยกเลิก" />
  </p>
  <p>&nbsp;</p>
</form>
<div id="spantest"></div>
</body>
</html>
